<!-- <template>
    <div class="login-container">
        <a-avatar size="large" :src="logo"></a-avatar>
        <h1>注册页面</h1>
        <a-form>
            <a-form-item label="注册账号" name="username">
                <a-input
                    v-model:value="userName"
                    placeholder="请输入注册账号"
                ></a-input>
            </a-form-item>
            <a-form-item label="注册密码" name="password">
                <a-input
                    v-model:value="password"
                    placeholder="请输入注册密码"
                    type="password"
                ></a-input>
            </a-form-item>
            <a-form-item>
                <a-button class="nas" type="primary" @click="login"
                    >去登录</a-button
                >
                <a-button class="nas" type="primary" @click="reg"
                    >注册</a-button
                >
            </a-form-item>
        </a-form>
    </div>
</template>

<script setup>
import { post } from "../../utils/request";
import { ref } from "vue";
const userName = ref("");
const password = ref("");

//注册
const reg = () => {
    const data = {
        userName: userName.value,
        password: password.value,
    };
    console.log(userName.value);
    console.log(password.value);
    post("/auth/reg", data).then((res) => {
        console.log(res);
    });
};
</script>

<style scoped>
.login-container {
    width: 400px;
    margin: 100px auto;
    text-align: center;
}
.nas {
    margin: 20px;
}
</style>
 -->
